Skip to content

Fix BLE reconnect: resume advertising after rejected peers - #14

Merged
1bobby-git merged 6 commits into
mainfrom
fix/ble-reconnect
Nov 12, 2026
Merged

1bobby-git merged 6 commits into
mainfrom
fix/ble-reconnect

Conversation

@1bobby-git

Copy link
Copy Markdown
Owner

문제

iPhone과의 BLE 연결이 끊어진 뒤 재연결이 잘 되지 않음.

원인

  • 본딩되지 않은 기기가 접속하면 거부 후 끊는데, 컨트롤러가 이미 광고를 멈춘 상태에서 advertising 플래그가 그대로 남고 끊김 이벤트도 stale peer로 무시되어 재부팅 전까지 광고가 재개되지 않음.
  • 광고 주기가 160 ms 고정으로 Apple 권장값과 맞지 않음.
  • 광고 상태 감시가 없고, 연결 파라미터를 요청하지 않음.

변경 (components/ancs_client/ancs_client.c)

  • 거부한 접속 뒤 광고 플래그 초기화 및 광고 재시작
  • 부팅/끊김/등록 요청 후 30초간 20 ms, 이후 152.5 ms 광고
  • 연결이 없는 동안 60초마다 광고 재설정
  • 인증 완료 후 연결 간격 30–45 ms, supervision timeout 6 s 요청

검증

  • 로컬 컴파일 및 실기기 테스트 미수행. 이 PR의 firmware CI 빌드로 컴파일 확인 필요.
  • 실기기: 다른 기기로 접속 시도 → 거부 후 광고 재개, iPhone 범위 이탈 후 복귀 시 재연결 확인 필요.

Generated by Claude Code

claude and others added 6 commits November 12, 2026 06:00
- Clear stale advertising flags and restart advertising when an
  unauthorized peer connects and is rejected (previously advertising
  stayed off until reboot).
- Advertise at 20 ms for 30 s after boot/disconnect/enroll, then
  152.5 ms (Apple Accessory Design Guidelines) instead of fixed 160 ms.
- Re-arm advertising every 60 s while disconnected to heal lost state.
- Request 30-45 ms interval and 6 s supervision timeout after auth.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017YMfNVLFCmfr5zAFPD2Fqy
Version anchors, manifests, tests and changelog. The verified 0.4.1
installer images and provenance follow once the firmware build of
555db82 completes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017YMfNVLFCmfr5zAFPD2Fqy
… workflow)

Adds the 0.6.16 release notes and a one-off workflow that verifies the
Firmware run artifacts, commits the installer images and prepares a
draft release. The workflow is removed before the merge.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Claude-Session: https://claude.ai/code/session_017YMfNVLFCmfr5zAFPD2Fqy
Artifacts of Firmware run 43165482384, built from 5366a90.
@1bobby-git
1bobby-git merged commit 87a3001 into main Nov 12, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants